package vm.machine;

public class ReturnInstruction extends  AbstractInstruction{

    ReturnInstruction(Machine machine){
        super(machine);
    }
    @Override
    public void doAction() {
    }

    @Override
    public void nextPc() {
        int retAddress = machine.stack.pop();
        machine.getRegister("pc").setValue(retAddress);
    }
    @Override
    public String toString() {
        return "执行Return指令";
    }


}
